// pages/index/index.js

Page({
  data:{
    url:''
  },
   //分享功能
   onShareAppMessage:function(){
    return {
      title: '油菜花',
      desc: '油菜花',
      path: '/page/common/test'
    }
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
    console.log("webView=========="+options.url)
    this.setData({url:options.url})
    wx.setNavigationBarTitle({
      title: options.title,
    })
  },

  onReady:function(){
    // 页面渲染完成
   
  },
  onShow:function(){
    // 页面显示
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  },
  openSchoolListWindow:function(){
    wx.navigateTo({
      url: '/page/school/list?categoryId=1'
    })
  },
  openMajarTypeWindow: function () {
    wx.navigateTo({
      url: '/page/majar/majar_type'
    })
  },
  openMajarSchoolListWindow: function (e) {
    
    wx.navigateTo({
      url: '/page/majar/majar_school_list?majarid=' + e.currentTarget.dataset.majarid
    })
  }, 
  openSchoolHomeWindow:function(e){
    wx.navigateTo({
      url: '/page/school/detail?schoolid=' + e.currentTarget.dataset.schoolid
    })
  },
  openSearchWin:function(e){
    wx.navigateTo({
      url: '/page/index/search'
    })
  }
})